import http from '@/utils/http'

// 支付方式列表（对齐旧项目约定）
// 后端应返回形如：[{ method: 'wechat' }, { method: 'alipay' }, { method: 'virtual', others: { name: '自定义' } }]
export function paymentList(params?: any) {
    // 与老项目保持 POST 方式；路径按约定，可按服务端实际调整
    return http.post('cashier/paymentList', params)
}

// 订单进入结算状态，查询订单支付信息
export function orderPaymentInfo(data: any) {
    return http.post('deskOrder/orderPayment', data)
}

// 支付
export function cashierOrderPay(data: any) {
    return http.post('cashier/orderPay', data)
}

// 挂账账户列表[支付专用]
export function creditList(data: any) {
    return http.post('credit/userOrgList', data)
}

// 积分支付
export function integriPay(data: any) {
    return http.post('deskOrder/integripay', data)
}

// 取消积分支付
export function integripayCancel(data: any) {
    return http.post('deskOrder/integripayCancel', data)
}

// 支付宝||微信支付结果查询
export function cashierTradeQuery(data: any) {
    return http.post('cashier/tradeQuery', data)
}

// 挂账账户列表
export function creditBillList(data: any) {
    return http.post('credit/list', data)
}

// 子账户列表
export function creditSubAccountList(data: any) {
    return http.post('credit/accountList', data)
}

// 订单确认结账
export function ashierTradeConfirmPay(data: any) {
    return http.post('cashier/tradeConfirm', data)
}


